#include <libge/libge.h>
#include "Player.h"

Player::Player(Client* cli) : Entity(cli) {
	moved = false;
	m_gameMode = 0;
	m_heldItemSlot = 0;
	flying = false;
	can_fly = false;
	invulnerable = false;
	creative = false;
	flyingSpeed = 10;
	walkingSpeed = 4;
	stance = 1.65;
	setLiving(true);
	setType(ENTITY_PLAYER);
	getPhysicState()->mass = 70.0;
}

double Player::getStance(){
	return stance;
}

void Player::setStance(double s){
	stance = s;
}

int Player::gameMode(){
	return m_gameMode;
}

void Player::setGameMode(int gm){
	m_gameMode = gm;
}

int Player::heldItemSlot(){
	return m_heldItemSlot;
}

void Player::setHealth(int h){
	health = h;
}

void Player::setFood(int f){
	food = f;
}

void Player::setFoodSaturation(float s){
	foodSaturation = s;
}

void Player::setExperienceBar(float b){
	expBar = b;
}

void Player::setLevel(int lvl){
	level = lvl;
}

void Player::setExperience(int e){
	exp = e;
}

void Player::setHeldItemSlot(int held){
	m_heldItemSlot = held;
}

bool Player::canFly(){
	return can_fly;
}

bool Player::isCreative(){
	return creative;
}

bool Player::isInvulnerable(){
	return invulnerable;
}

int Player::FlyingSpeed(){
	return flyingSpeed;
}

int Player::WalkingSpeed(){
	return walkingSpeed;
}

void Player::setInvulnerable(bool inv){
	invulnerable = inv;
}

void Player::setCanFly(bool can){
	can_fly = can;
}

void Player::setCreative(bool crea){
	creative = crea;
}

void Player::setFlyingSpeed(int sp){
	flyingSpeed = sp;
}

void Player::setWalkingSpeed(int sp){
	walkingSpeed = sp;
}
